Complete API reference for sending events to Flexprice
POST /events
Headers:
202 Accepted
POST /events/bulk
Headers:
202 Accepted
Field | Type | Description | Example |
---|---|---|---|
event_name | string | Must exactly match your feature’s Event Name | "model.usage" |
external_customer_id | string | Your identifier for the customer | "cust_123" |
Field | Type | When Required | Description | Example |
---|---|---|---|---|
properties | object | For Sum, Max, Latest, Unique Count | Contains values to aggregate | {"credits": 2} |
properties.<field> | number/string | When aggregation field is set | Exact field name from feature config | 2 or "user_123" |
Field | Type | Description | Example |
---|---|---|---|
event_id | string | Your unique identifier for the event | "evt_abc123" |
timestamp | string | ISO 8601 UTC timestamp | "2025-08-22T07:05:49.441Z" |
source | string | Origin of the event | "api" , "worker" |
"2025-08-22T07:05:49.441Z"
Status | Description |
---|---|
202 Accepted | Event accepted for processing |
400 Bad Request | Invalid payload or missing required fields |
401 Unauthorized | Invalid or missing API key |
429 Too Many Requests | Rate limit exceeded |